<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	seq		= Request("seq")
		
	addHitSql = "UPDATE tblFreeBoard SET hit=(hit+1) WHERE seq=" & seq
	DbCon.execute addHitSql
	
	SQLTitle = "-- ■■■■  자유게시판 상세 정보 ■■■■"
	
	SQL = "SELECT B.userNm, A.userId, A.seq, A.titles, A.contents, CONVERT(varchar(16), A.issueDt, 121) wDate, A.files, A.hit " & _
			"	FROM tblFreeBoard A LEFT JOIN tblUser B ON A.userId=B.userId WHERE A.seq=" & seq

	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

	Set Rs=Server.CreateObject("ADODB.RecordSet")
	Rs.open SQL, DbCon, 1
	
	Response.write "<BbsDetail>" & vbcrlf

	If Rs.eof Or Rs.bof Then 
	Else 
		Do Until Rs.eof Or Rs.bof
		
			Call mkXMLNode("seq", rs("seq"), 1)
			Call mkXMLNode("titles", rs("titles"), 1)
			Call mkXMLNode("userNm", rs("userNm"), 1)
			Call mkXMLNode("userId", rs("userId"), 1)
			Call mkXMLNode("hit", rs("hit"), 1)
			Call mkXMLNode("wDate", rs("wDate"), 1)
			Call mkXMLNode("files", rs("files"), 1)
			Call mkXMLNode("contents", rs("contents"), 1)
		Rs.movenext
		Loop 
	End If
				  
	Response.write "</BbsDetail>" & vbcrlf
'	Call rsWithXML("Save OK!")
%>